﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace 招聘网站
{
    public partial class Form10 : Form
    {
        public static string c;
       
        public Form10()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            c = textBox1.Text;
            string SqlStr1 = "server=.;database=zhaopin;integrated security=SSPI";
            SqlConnection con = new SqlConnection(SqlStr1);
            con.Open();
            SqlCommand comm = new SqlCommand();
            comm.Connection = con;
            comm.CommandText = "insert into table_6(name,guanjianci) values( '" + textBox1.Text + "','" + Form9.b + "' )";
            comm.ExecuteNonQuery();
            con.Close();
            Form12 f12 =new Form12();
            f12.Show();
            
        }

        private void Form10_Load(object sender, EventArgs e)
        {
            string SqlStr = "server=.;database=zhaopin;integrated security=SSPI";
            SqlConnection conn = new SqlConnection(SqlStr);
            conn.Open();
           // SqlDataAdapter sdr = new SqlDataAdapter("select like 'a+b' from table_4 and table_3", con);
            SqlDataAdapter sqlda = new SqlDataAdapter("select * from table_2 where xuewei='"+Form9 .a  +"' and cszhiye='"+Form9 .b +"'", conn);
            DataSet myds = new DataSet();
            sqlda.Fill(myds, "table_2");
            dataGridView1.DataSource = myds.Tables["table_2"];
            conn.Close();

        }
    }
}
